package com.ruoyi.web.controller.gcgl;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ConvertUpMoneyUtil;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.DecimalCalculateUtil;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.gcgl.domain.GcFyhx;
import com.ruoyi.gcgl.domain.GcFyhxitem;
import com.ruoyi.gcgl.domain.GcProject;
import com.ruoyi.gcgl.domain.SjProcessConfig;
import com.ruoyi.gcgl.domain.SjProjectPeople;
import com.ruoyi.gcgl.domain.YyProject;
import com.ruoyi.gcgl.service.IGcCustomerService;
import com.ruoyi.gcgl.service.IGcFyhxService;
import com.ruoyi.gcgl.service.IGcFyhxitemService;
import com.ruoyi.gcgl.service.IGcProjectService;
import com.ruoyi.gcgl.service.IGcSendTipService;
import com.ruoyi.gcgl.service.ISjProcessConfigService;
import com.ruoyi.gcgl.service.ISjProjectPeopleService;
import com.ruoyi.gcgl.service.IYyProjectService;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysRoleService;

/**
 * 费用核销Controller
 * 
 * @author ruoyi
 * @date 2022-12-17
 */
@Controller
@RequestMapping("/gcgl/fyhx")
public class GcFyhxController extends BaseController
{
    private String prefix = "gcgl/fyhx";

    @Autowired
    private IGcFyhxService gcFyhxService;
    @Autowired
    private IGcFyhxitemService gcFyhxitemService;
    @Autowired
    private IGcSendTipService gcSendTipService;
    @Autowired
    private IGcProjectService gcProjectService;
    @Autowired
    private IYyProjectService yyProjectService;
    @Autowired
    private IGcCustomerService gcCustomerService;
    @Resource
    private RuntimeService runtimeService;
    @Resource
    private TaskService taskService;
    @Autowired
    private ISjProcessConfigService sjProcessConfigService;
    @Autowired
    private ISysDeptService deptService;
    @Autowired
    private ISysRoleService roleService;
    
    final String processCode = "sjbaoxiao";
    @Autowired
    private ISjProjectPeopleService sjProjectPeopleService;
    
    @RequiresPermissions("gcgl:fyhx:view")
    @GetMapping()
    public String fyhx(ModelMap mmap)
    {
    	mmap.put("type", "费用核销");
        return prefix + "/fyhx";
    }

    /**
     * 查询费用核销列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(GcFyhx gcFyhx)
    {
        startPage();
        gcFyhx.setDeleteFlag(1);
        
        //角色数据权限 ==根据用户定义的数据权限查看项目数据
        List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
        int count = roleService.selectCountRoleDeptByRoleId(roleIds);
        if(count != 0){
        	//看部门
        	gcFyhx.setRoleIds(roleIds);
        }else{
        	//看个人
        	if(getSysUser().isShowRoleIds(roleIds)){
        		gcFyhx.setOwnerId(getUserId());
            }
        }
        //----
        List<GcFyhx> list = gcFyhxService.selectGcFyhxList(gcFyhx);
        return getDataTable(list);
    }

    /**
     * 导出费用核销列表
     */
    @RequiresPermissions("gcgl:fyhx:export")
    @Log(title = "费用核销", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    @ResponseBody
    public AjaxResult export(GcFyhx gcFyhx)
    {
    	gcFyhx.setDeleteFlag(1);
    	if(getSysUser().isShow()){
            gcFyhx.setCreateUser(getLoginName());
            }
        List<GcFyhx> list = gcFyhxService.selectGcFyhxList(gcFyhx);
        ExcelUtil<GcFyhx> util = new ExcelUtil<GcFyhx>(GcFyhx.class);
        return util.exportExcel(list, "费用核销数据");
    }
    
    /**
     * 新增费用核销
     */
    @GetMapping("/add")
    public String add(ModelMap mmap){
    	mmap.put("bxr", getLoginName());
    	mmap.put("bxrAt", DateUtils.getDate());
    	
    	mmap.put("owner", getLoginName());
    	mmap.put("ownerId", getUserId());
    	mmap.put("deptName", getSysUser().getDept().getDeptName());
    	mmap.put("deptId", getSysUser().getDept().getDeptId());
    	
    	//下一级审核人
        List<SjProcessConfig> configlis = returnUser(getSysUser().getDept().getDeptId());
        mmap.put("approveid", configlis.get(0).getLevel1id());
        mmap.put("approvename", configlis.get(0).getLevel1name());
        
      //所属
        SysDept dept = new SysDept();
        dept.setDelFlag("1");
        dept.setParentId(100l);
        List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
        mmap.put("deptlis", deptlis);
        return prefix + "/add";
    }

    /**
     * 新增费用核销
     */
    @GetMapping("/add/{id}")
    public String add(ModelMap mmap,@PathVariable("id") Long id){
    	mmap.put("bxr", getLoginName());
    	mmap.put("bxrAt", DateUtils.getDate());
    	
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	mmap.put("owner", getLoginName());
    	mmap.put("ownerId", getUserId());
    	mmap.put("deptName", getSysUser().getDept().getDeptName());
    	mmap.put("deptId", getSysUser().getDept().getDeptId());
    	
    	//下一级审核人
        List<SjProcessConfig> configlis = returnUser(getSysUser().getDept().getDeptId());
        mmap.put("approveid", configlis.get(0).getLevel1id());
        mmap.put("approvename", configlis.get(0).getLevel1name());
        
      //所属
        SysDept dept = new SysDept();
        dept.setDelFlag("1");
        dept.setParentId(100l);
        List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
        mmap.put("deptlis", deptlis);
        return prefix + "/add";
    }
    
    /**
     * 新增费用核销
     */
    @GetMapping("/add/{id}/{type}")
    public String add(ModelMap mmap,@PathVariable("id") Long id,@PathVariable("type") String type){
    	mmap.put("bxr", getLoginName());
    	mmap.put("bxrAt", DateUtils.getDate());
    	
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	mmap.put("owner", getLoginName());
    	mmap.put("ownerId", getUserId());
    	mmap.put("deptName", getSysUser().getDept().getDeptName());
    	mmap.put("deptId", getSysUser().getDept().getDeptId());
    	if(type.equals("0")){
    		mmap.put("typestr", "税金及管理费");
    	}else if(type.equals("1")){
    		mmap.put("typestr", "业务费");
    	}else if(type.equals("2")){
    		mmap.put("typestr", "项目绩效");
    	}else if(type.equals("3")){
    		mmap.put("typestr", "商务费用");
    	}else if(type.equals("4")){
    		mmap.put("typestr", "图文制作支出");
    	}else if(type.equals("5")){
    		mmap.put("typestr", "其他");
    	}else if(type.equals("6")){
    		mmap.put("typestr", "运营管理费");
    	}else if(type.equals("7")){
    		mmap.put("typestr", "运营税金");
    	}else if(type.equals("8")){
    		mmap.put("typestr", "运营内审费");
    	}else{
    		mmap.put("typestr", "费用核销");
    	}    
    	
    	//下一级审核人
        List<SjProcessConfig> configlis = returnUser(getSysUser().getDept().getDeptId());
        mmap.put("approveid", configlis.get(0).getLevel1id());
        mmap.put("approvename", configlis.get(0).getLevel1name());
        
      //所属
        SysDept dept = new SysDept();
        dept.setDelFlag("1");
        dept.setParentId(100l);
        List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
        mmap.put("deptlis", deptlis);
        return prefix + "/add4Type";
    }

    /**
     * 新增保存费用核销
     */
    @RequiresPermissions("gcgl:fyhx:add")
    @Log(title = "费用核销", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    @ResponseBody
    public synchronized AjaxResult addSave(GcFyhx gcFyhx){
    	try {
    		SimpleDateFormat sdy = new SimpleDateFormat("yyyy");
    		SimpleDateFormat sdm = new SimpleDateFormat("MM");
    		int year = Integer.parseInt(sdy.format(new Date()));
    		int month = Integer.parseInt(sdm.format(new Date()));
    		GcFyhx newObj = new GcFyhx();
    		newObj.setDeleteFlag(1);
    		newObj.setCreateAt(DateUtils.getFisrtDayOfMonth(year, month));
    		newObj.setUpdateAt(DateUtils.getLastDayOfMonth(year, month));
    		List<GcFyhx> lisCount = gcFyhxService.selectGcFyhxList(newObj);
    		
    		String no = String.format("%02d", lisCount.size()+1);
    		String l_month = String.format("%02d", month);
    		gcFyhx.setOrderNo(year+"-"+l_month+"-"+no);
    		gcFyhx.setDeleteFlag(1);
        	gcFyhx.setCreateAt(new Date());
        	gcFyhx.setUpdateAt(new Date());
        	gcFyhx.setCreateUser(getLoginName());
        	gcFyhx.setUpdateUser(getLoginName());
        	gcFyhx.setStatus(1);
        	gcFyhx.setBxr(getLoginName());
        	gcFyhx.setBxrAt(new Date());
        	gcFyhxService.insertGcFyhx(gcFyhx);
        	
        	Double hejexx = 0.0;
        	for(GcFyhxitem gcFyhxitem:gcFyhx.getItem()){
        		hejexx=DecimalCalculateUtil.add(hejexx, 
        				Double.parseDouble(gcFyhxitem.getJine().toString()));
        		gcFyhxitem.setDeleteFlag(1);
        		gcFyhxitem.setCreateAt(new Date());
        		gcFyhxitem.setUpdateAt(new Date());
        		gcFyhxitem.setCreateUser(getLoginName());
        		gcFyhxitem.setUpdateUser(getLoginName());
        		gcFyhxitem.setFyhxId(gcFyhx.getId());
        		gcFyhxitemService.insertGcFyhxitem(gcFyhxitem);
        	}
        	
        	gcFyhx.setBxrje(Double.valueOf(hejexx));
        	gcFyhx.setHejexx(hejexx.toString());
        	gcFyhx.setHejedx(ConvertUpMoneyUtil.toChinese(hejexx.toString()));
        	gcFyhxService.updateGcFyhx4check(gcFyhx);
        	
        	//发送消息通知
        	gcSendTipService.sendTip("fyhx", gcFyhx.getType(), gcFyhx.getOrderNo(), 
        			gcFyhx.getCreateUser(), DateUtils.dateTime(gcFyhx.getCreateAt()), 
        			gcFyhx.getStatus().toString(), null, gcFyhx.getId().toString());
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return toAjax(0);
		}
    	
        return toAjax(1);
    }

    /**
     * 修改费用核销
     */
    @RequiresPermissions("gcgl:fyhx:edit")
    @GetMapping("/edit/{id}")
    public String edit(@PathVariable("id") Long id, ModelMap mmap){
        GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(id);
        GcFyhxitem gcFyhxitem = new GcFyhxitem();
        gcFyhxitem.setFyhxId(id);
        List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
        gcFyhx.setItem(items);
        mmap.put("gcFyhx", gcFyhx);
        
        //下一级审核人
        List<SjProcessConfig> configlis = returnUser(getSysUser().getDept().getDeptId());
        mmap.put("approveid", configlis.get(0).getLevel1id());
        mmap.put("approvename", configlis.get(0).getLevel1name());
        
      //所属
        SysDept dept = new SysDept();
        dept.setDelFlag("1");
        dept.setParentId(100l);
        List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
        mmap.put("deptlis", deptlis);
        return prefix + "/edit";
    }

    /**
     * 修改保存费用核销
     */
    @RequiresPermissions("gcgl:fyhx:edit")
    @Log(title = "费用核销", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    @ResponseBody
    public AjaxResult editSave(GcFyhx gcFyhx)
    {
    	try {
    		gcFyhxitemService.deleteGcFyhxitemById(gcFyhx.getId());
    		
    		Double hejexx = 0.0;
        	//item
        	for(GcFyhxitem item : gcFyhx.getItem()){
        		hejexx=DecimalCalculateUtil.add(hejexx, 
        				Double.parseDouble(item.getJine().toString()));
        		item.setDeleteFlag(1);
        		item.setUpdateAt(new Date());
        		item.setCreateUser(getLoginName());
        		item.setUpdateUser(getLoginName());
        		item.setFyhxId(gcFyhx.getId());
        		gcFyhxitemService.insertGcFyhxitem(item);
        	}
        	
        	gcFyhx.setBxrje(Double.valueOf(hejexx));
        	gcFyhx.setHejexx(hejexx.toString());
        	gcFyhx.setHejedx(ConvertUpMoneyUtil.toChinese(hejexx.toString()));
        	gcFyhx.setUpdateAt(new Date());
        	gcFyhx.setUpdateUser(getLoginName());
        	gcFyhxService.updateGcFyhx(gcFyhx);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return toAjax(0);
		}
    	
        return toAjax(1);
    }

    /**
     * 删除费用核销
     */
    @RequiresPermissions("gcgl:fyhx:remove")
    @Log(title = "费用核销", businessType = BusinessType.DELETE)
    @PostMapping( "/remove")
    @ResponseBody
    public AjaxResult remove(String ids)
    {
        return toAjax(gcFyhxService.deleteGcFyhxByIds(ids));
    }
    
    /////财务审批
    @RequiresPermissions("gcgl:fyhx:cwpsview")
    @GetMapping("/cwps")
    public String cwps()
    {
        return prefix + "/fyhxcwps";
    }
    
    @PostMapping("/cwpslist")
    @ResponseBody
    public TableDataInfo cwpslist(GcFyhx gcFyhx)
    {
        startPage();
        gcFyhx.setDeleteFlag(1);
        gcFyhx.setStatus(0);
        List<GcFyhx> list = gcFyhxService.selectGcFyhxList(gcFyhx);
        return getDataTable(list);
    }
    
    @Log(title = "通过", businessType = BusinessType.UPDATE)
    @PostMapping("/cwyes")
    @ResponseBody
    public AjaxResult cwyes(String ids, ModelMap mmap){
    	String[] id = Convert.toStrArray(ids);
    	for(int i=0;i<id.length;i++){
    		GcFyhx obj = new GcFyhx();
    		obj.setId(Long.parseLong(id[i]));
    		obj.setStatus(1);
    		obj.setSpr(getLoginName());
    		obj.setSprAt(new Date());
    		gcFyhxService.updateGcFyhx(obj);
    		
    		GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(id[i].toString()));
    		gcSendTipService.sendTip("fyhx", gcFyhx.getType(), gcFyhx.getOrderNo(), 
        			gcFyhx.getCreateUser(), DateUtils.dateTime(gcFyhx.getCreateAt()), 
        			gcFyhx.getStatus().toString(), null, gcFyhx.getId().toString());
    	}
    	
    	return toAjax(1);
    }
    
    @Log(title = "不通过", businessType = BusinessType.UPDATE)
    @PostMapping("/cwno")
    @ResponseBody
    public AjaxResult cwno(String ids, ModelMap mmap){
    	String[] id = Convert.toStrArray(ids);
    	for(int i=0;i<id.length;i++){
    		GcFyhx obj = new GcFyhx();
    		obj.setId(Long.parseLong(id[i]));
    		obj.setStatus(2);
    		obj.setSpr(getLoginName());
    		obj.setSprAt(new Date());
    		gcFyhxService.updateGcFyhx(obj);
    		
    		GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(id[i].toString()));
    		gcSendTipService.sendTip("fyhx", gcFyhx.getType(), gcFyhx.getOrderNo(), 
        			gcFyhx.getCreateUser(), DateUtils.dateTime(gcFyhx.getCreateAt()), 
        			gcFyhx.getStatus().toString(), null, gcFyhx.getId().toString());
    	}
    	return toAjax(1);
    }
    
    /////总经理审批
    @RequiresPermissions("gcgl:fyhx:zjlpsview")
    @GetMapping("/zjlps")
    public String zjlps()
    {
        return prefix + "/fyhxzjlps";
    }
    
    @PostMapping("/zjlpslist")
    @ResponseBody
    public TableDataInfo zjlpslist(GcFyhx gcFyhx)
    {
        startPage();
        gcFyhx.setDeleteFlag(1);
        gcFyhx.setStatus(1);
        List<GcFyhx> list = gcFyhxService.selectGcFyhxList(gcFyhx);
        return getDataTable(list);
    }
    
    @Log(title = "通过", businessType = BusinessType.UPDATE)
    @PostMapping("/zjlyes")
    @ResponseBody
    public AjaxResult zjlyes(String ids, ModelMap mmap){
    	String[] id = Convert.toStrArray(ids);
    	for(int i=0;i<id.length;i++){
    		GcFyhx obj = new GcFyhx();
    		obj.setId(Long.parseLong(id[i]));
    		obj.setStatus(3);
    		obj.setLdsp(getLoginName());
    		obj.setLdspAt(new Date());
    		gcFyhxService.updateGcFyhx(obj);
    		
    		GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(id[i].toString()));
    		gcSendTipService.sendTip("fyhx", gcFyhx.getType(), gcFyhx.getOrderNo(), 
        			gcFyhx.getCreateUser(), DateUtils.dateTime(gcFyhx.getCreateAt()), 
        			gcFyhx.getStatus().toString(), null, gcFyhx.getId().toString());
    	}
    	
    	return toAjax(1);
    }
    
    @Log(title = "不通过", businessType = BusinessType.UPDATE)
    @PostMapping("/zjlno")
    @ResponseBody
    public AjaxResult zjlno(String ids, ModelMap mmap){
    	String[] id = Convert.toStrArray(ids);
    	for(int i=0;i<id.length;i++){
    		GcFyhx obj = new GcFyhx();
    		obj.setId(Long.parseLong(id[i]));
    		obj.setStatus(4);
    		obj.setLdsp(getLoginName());
    		obj.setLdspAt(new Date());
    		gcFyhxService.updateGcFyhx(obj);
    		
    		GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(id[i].toString()));
    		gcSendTipService.sendTip("fyhx", gcFyhx.getType(), gcFyhx.getOrderNo(), 
        			gcFyhx.getCreateUser(), DateUtils.dateTime(gcFyhx.getCreateAt()), 
        			gcFyhx.getStatus().toString(), null, gcFyhx.getId().toString());
    	}
    	return toAjax(1);
    }
    
    @GetMapping("/fyhxprint/{id}")
    public String fyhxprint(@PathVariable("id") Long id, ModelMap mmap){
    	GcFyhx obj = gcFyhxService.selectGcFyhxById(id);
    	
    	if(obj.getAuthority()==null || obj.getAuthority().toString().equals("")){
    		obj.setAuthorityName("");
    	}else{
    		SysDept dept = deptService.selectDeptById(Long.parseLong(obj.getAuthority().toString()));
        	obj.setAuthorityName(dept.getDeptName());
    	}
        
    	GcFyhxitem items = new GcFyhxitem();
        items.setFyhxId(id);
        List<GcFyhxitem> itemlis= gcFyhxitemService.selectGcFyhxitemList(items);
        mmap.put("count", itemlis.size());
        if(itemlis!=null){
        	obj.setItem(itemlis);
        }
        mmap.put("obj", obj);
        
        return prefix + "/fyhxprint";
    }
    
    @GetMapping("/fyhxcwsp/{id}")
    public String fyhxcwsp(@PathVariable("id") Long id, ModelMap mmap){
    	GcFyhx obj = gcFyhxService.selectGcFyhxById(id);
        
    	GcFyhxitem items = new GcFyhxitem();
        items.setFyhxId(id);
        List<GcFyhxitem> itemlis= gcFyhxitemService.selectGcFyhxitemList(items);
        mmap.put("count", itemlis.size());
        if(itemlis!=null){
        	obj.setItem(itemlis);
        }
        mmap.put("obj", obj);
        
        return prefix + "/fyhxcwsp";
    }
    
    @GetMapping("/fyhxzjlsp/{id}")
    public String fyhxzjlsp(@PathVariable("id") Long id, ModelMap mmap){
    	GcFyhx obj = gcFyhxService.selectGcFyhxById(id);
        
    	GcFyhxitem items = new GcFyhxitem();
        items.setFyhxId(id);
        List<GcFyhxitem> itemlis= gcFyhxitemService.selectGcFyhxitemList(items);
        mmap.put("count", itemlis.size());
        if(itemlis!=null){
        	obj.setItem(itemlis);
        }
        mmap.put("obj", obj);
        
        return prefix + "/fyhxzjlsp";
    }
    
    @GetMapping("/p4fyhx/{id}")
    public String p4fyhx(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhx";
    }

    /**
     * 查询费用核销列表
     */
    @PostMapping("/p4list")
    @ResponseBody
    public TableDataInfo p4list(GcFyhx gcFyhx){
        gcFyhx.setDeleteFlag(1);
      //角色数据权限 ==根据用户定义的数据权限查看项目数据
        List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
        int count = roleService.selectCountRoleDeptByRoleId(roleIds);
        if(count != 0){
        	//看部门
        	gcFyhx.setRoleIds(roleIds);
        }else{
        	//看个人
        	if(getSysUser().isShowRoleIds(roleIds)){
        		gcFyhx.setOwnerId(getUserId());
            }
        }
        //----
        List<GcFyhx> list = gcFyhxService.selectGcFyhxList(gcFyhx);
        
        return getDataTable(list);
    }
    
    //---------------------增加类型
    @GetMapping("/p4fyhxQtfy/{id}")
    public String p4fyhxQtfy(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhxQtfy";
    }
    
    @GetMapping("/p4fyhxSjgl/{id}")
    public String p4fyhxSjgl(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhxSjgl";
    }
    
    @GetMapping("/p4fyhxSwfy/{id}")
    public String p4fyhxSwfy(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhxSwfy";
    }
    
    @GetMapping("/p4fyhxTwzzzc/{id}")
    public String p4fyhxTwzzzc(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhxTwzzzc";
    }
    
    @GetMapping("/p4fyhxXmyj/{id}")
    public String p4fyhxXmyj(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhxXmyj";
    }
    
    @GetMapping("/p4fyhxYwf/{id}")
    public String p4fyhxYwf(ModelMap mmap,@PathVariable("id") Long id){
    	GcProject po = gcProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
    	
    	//判断是成员，还是管理员
    	List<SysRole> roles = getSysUser().getRoles();
        List<Long> roleIds = new ArrayList<Long>();
        for(SysRole obj:roles){
        	roleIds.add(obj.getRoleId());
        }
        
    	//看个人
        int flag = 0;//成员
    	if(getSysUser().isShowRoleIds(roleIds)){
    		SjProjectPeople sjProjectPeople = new SjProjectPeople();
            sjProjectPeople.setDeleteFlag(1);
            sjProjectPeople.setGcProjectid(id);
            sjProjectPeople.setCode(getUserId().toString());
            List<SjProjectPeople> peoplelis = sjProjectPeopleService.selectSjProjectPeopleList(sjProjectPeople);
            if(peoplelis!=null && peoplelis.size()>0){
            	for(SjProjectPeople po1:peoplelis){
                	if(po1.getpId()==0l){
                		flag = 1;//领导
                		break;
                	}
                }
            }
        }else{
        	flag = 1;//领导
        }
        mmap.put("flag", flag);
        return "sj/project/projectDetailFyhxYwf";
    }
    
    //---------------------
    //运营管理费
    @GetMapping("/p4fyhxYyglf/{id}")
    public String p4fyhxYyglf(ModelMap mmap,@PathVariable("id") Long id){
    	YyProject po = yyProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
        return "yy/project/projectDetailFyhxYyglf";
    }
    
    //运营税金
    @GetMapping("/p4fyhxYysj/{id}")
    public String p4fyhxYysj(ModelMap mmap,@PathVariable("id") Long id){
    	YyProject po = yyProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
        return "yy/project/projectDetailFyhxYysj";
    }
    
    //运营内审费
    @GetMapping("/p4fyhxYynsf/{id}")
    public String p4fyhxYynsf(ModelMap mmap,@PathVariable("id") Long id){
    	YyProject po = yyProjectService.selectGcProjectById(id);
    	mmap.put("gcProject", po);
        return "yy/project/projectDetailFyhxYynsf";
    }
    //---------------------审批方法
    //申请人部门PID
    private List<SjProcessConfig> returnUser(Long deptId){
    	SysDept dept = deptService.selectDeptById(deptId);
    	SjProcessConfig sjProcessConfig = new SjProcessConfig();
        sjProcessConfig.setDeleteFlag(1);
        sjProcessConfig.setCode(processCode);
        sjProcessConfig.setDeptId(dept.getParentId());
        List<SjProcessConfig> configlis = sjProcessConfigService.selectSjProcessConfigList(sjProcessConfig);
		
        if(configlis==null || configlis.size()==0){
        	SjProcessConfig sjProcessConfig1 = new SjProcessConfig();
        	sjProcessConfig1.setDeleteFlag(1);
        	sjProcessConfig1.setCode("morenliucheng");
            List<SjProcessConfig> configlis1 = sjProcessConfigService.selectSjProcessConfigList(sjProcessConfig1);
            return configlis1;
        }
        return configlis;
    }
    
    /**
     * 修改保存项目立项
     */
    @Log(title = "费用核销", businessType = BusinessType.UPDATE)
    @PostMapping("/edit4check")
    @ResponseBody
    public AjaxResult edit4check(GcFyhx gcFyhx){
    	try {
    		gcFyhxitemService.deleteGcFyhxitemById(gcFyhx.getId());
    		
    		Double hejexx = 0.0;
        	//item
        	for(GcFyhxitem item : gcFyhx.getItem()){
        		hejexx=DecimalCalculateUtil.add(hejexx, 
        				Double.parseDouble(item.getJine().toString()));
        		item.setDeleteFlag(1);
        		item.setUpdateAt(new Date());
        		item.setCreateUser(getLoginName());
        		item.setUpdateUser(getLoginName());
        		item.setFyhxId(gcFyhx.getId());
        		gcFyhxitemService.insertGcFyhxitem(item);
        	}
        	
        	gcFyhx.setBxrje(Double.valueOf(hejexx));
        	gcFyhx.setHejexx(hejexx.toString());
        	gcFyhx.setHejedx(ConvertUpMoneyUtil.toChinese(hejexx.toString()));
        	gcFyhx.setUpdateAt(new Date());
        	gcFyhx.setUpdateUser(getLoginName());
        	gcFyhxService.updateGcFyhx4check(gcFyhx);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return toAjax(0);
		}
    	
        return toAjax(1);
    }
    
    /**
     * level1
     * @return
     */
    @GetMapping("/level1")
    public String level1(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
            //下一级审核人
            List<SjProcessConfig> configlis = returnUser(Long.valueOf(gcFyhx.getDeptId().toString()));
            mmap.put("approveid", configlis.get(0).getLevel2id());
            mmap.put("approvename", configlis.get(0).getLevel2name());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level1check";
    }
    
    /**
     * level1
     * @return
     */
    @GetMapping("/level2")
    public String level2(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //下一级审核人
            mmap.put("approveid", gcFyhx.getHjId());
            mmap.put("approvename", gcFyhx.getHj());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level2check";
    }
    /**
     * level1
     * @return
     */
    @GetMapping("/level3")
    public String level3(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //下一级审核人
            mmap.put("approveid", gcFyhx.getFzjl1Id());
            mmap.put("approvename", gcFyhx.getFzjl1());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level3check";
    }
    /**
     * level1
     * @return
     */
    @GetMapping("/level4")
    public String level4(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //下一级审核人
            mmap.put("approveid", gcFyhx.getFzjl2Id());
            mmap.put("approvename", gcFyhx.getFzjl2());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level4check";
    }
    /**
     * level1
     * @return
     */
    @GetMapping("/level5")
    public String level5(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //下一级审核人
            mmap.put("approveid", gcFyhx.getZjlId());
            mmap.put("approvename", gcFyhx.getZjl());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level5check";
    }
    
    /**
     * level1
     * @return
     */
    @GetMapping("/level6")
    public String level6(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //下一级审核人
            mmap.put("approveid", gcFyhx.getCnId());
            mmap.put("approvename", gcFyhx.getCn());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level6check";
    }
    
    /**
     * level1
     * @return
     */
    @GetMapping("/level7")
    public String level7(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
        	
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //下一级审核人
            List<SjProcessConfig> configlis = returnUser(Long.valueOf(gcFyhx.getDeptId().toString()));
            mmap.put("approveid", configlis.get(0).getLevel8id());
            mmap.put("approvename", configlis.get(0).getLevel8name());
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/level7check";
    }
    
    /**
     * 修改单据
     * @param taskid
     * @param mmap
     * @return
     */
    @GetMapping("/modify")
    public String modify(String taskid, ModelMap mmap){
        Task t = taskService.createTaskQuery().taskId(taskid).singleResult();
        String processId = t.getProcessInstanceId();
        ProcessInstance p = runtimeService.createProcessInstanceQuery().processInstanceId(processId).singleResult();
        if (p != null) {
        	GcFyhx gcFyhx = gcFyhxService.selectGcFyhxById(Long.parseLong(p.getBusinessKey().toString()));
            GcFyhxitem gcFyhxitem = new GcFyhxitem();
            gcFyhxitem.setFyhxId(gcFyhx.getId());
            List<GcFyhxitem> items = gcFyhxitemService.selectGcFyhxitemList(gcFyhxitem);
            gcFyhx.setItem(items);
            mmap.put("obj", gcFyhx);
            
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            mmap.put("taskid", taskid);
            
          //所属
            SysDept dept = new SysDept();
            dept.setDelFlag("1");
            dept.setParentId(100l);
            List<SysDept> deptlis = deptService.selectDeptList4pId(dept);
            mmap.put("deptlis", deptlis);
        }
        
        return prefix + "/modifycheck";
    }
    
    //------------财务部分--打开界面
    //0税金及管理费  1业务费 2项目绩效 3商务费用 4图文制作支出 5其他 6投标费用 7差旅报销
    @GetMapping("/fyhxSjgl")
    public String fyhxSjgl(ModelMap mmap){
    	mmap.put("type", "税金及管理费");
        return prefix + "/fyhxSjgl";
    }
    
    @GetMapping("/fyhxYwf")
    public String fyhxYwf(ModelMap mmap){
    	mmap.put("type", "业务费");
        return prefix + "/fyhxYwf";
    }
    
    @GetMapping("/fyhxXmyj")
    public String fyhxXmyj(ModelMap mmap){
    	mmap.put("type", "项目绩效");
        return prefix + "/fyhxXmyj";
    }
    
    @GetMapping("/fyhxSwfy")
    public String fyhxSwfy(ModelMap mmap){
    	mmap.put("type", "商务费用");
        return prefix + "/fyhxSwfy";
    }
    
    @GetMapping("/fyhxTwzzzc")
    public String fyhxTwzzzc(ModelMap mmap){
    	mmap.put("type", "图文制作支出");
        return prefix + "/fyhxTwzzzc";
    }
    
    @GetMapping("/fyhxQtfy")
    public String fyhxQtfy(ModelMap mmap){
    	mmap.put("type", "其他");
        return prefix + "/fyhxQtfy";
    }
    
    @GetMapping("/fyhxYyglf")
    public String fyhxYyglf(ModelMap mmap){
    	mmap.put("type", "运营管理费");
        return prefix + "/fyhxYyglf";
    }
    
    @GetMapping("/fyhxYysj")
    public String fyhxYysj(ModelMap mmap){
    	mmap.put("type", "运营税金");
        return prefix + "/fyhxYysj";
    }
    
    @GetMapping("/fyhxYynsf")
    public String fyhxYynsf(ModelMap mmap){
    	mmap.put("type", "运营内审费");
        return prefix + "/fyhxYynsf";
    }
}